Why do I get the error "The target GatherAllFilesToPublish does not exist"?

I have recently installed the new Azure development tools for Visual Studio 2010 service pack 1. Every time that I try to publish an existing website (using file system deployment) I get the following error:

The target "GatherAllFilesToPublish" does not exist in the project.

Can anyone tell me what I am missing?

Thanks


June 12th, 2012 3:07am

Hi,

Base on my understanding, File system deployment is used to deploy web application or website on IIS, Azure deployment donot need choose File System as the publishing way.

Free Windows Admin Tool Kit Click here and download it now
June 12th, 2012 1:02pm

I'm having the same issue after installing the Visual Studio 2012 RC. Now if I create a new web project and I try to publish it I get this error, it's not an azure project.

If I add a target named GatherAllFilesToPublish to the project file then it works but my File System publish destination folder stays empty.

------ Publish started: Project: XXX, Configuration: Debug Any CPU ------
Connecting to C:\Temp\XXX...
Deleting existing files...
Publishing folder /...

========== Build: 7 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

The Visual Studio 2010 publishing tool was changed, I didn't want that to happen, now it doesn't work. Hours of work lost.

June 12th, 2012 6:52pm

Hi Eduardo,

I added  

  <Target Name="GatherAllFilesToPublish">
  </Target> to project file and error gone.

For empty destination folder I had the same problem if the publish profile was set to "Release" on configuration. I changed to "Debug" and suddenly publishing folder is filled. For sure "Debug" version is not what you want to publish but I found that at least "Debug" configuration is working.


  • Edited by Yuri Bonev Wednesday, June 13, 2012 8:40 AM
  • Proposed as answer by TD10 Thursday, June 14, 2012 3:33 AM
  • Unproposed as answer by TD10 Thursday, June 14, 2012 3:33 AM
  • Proposed as answer by Jason Carter Wednesday, November 28, 2012 9:08 PM
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2012 11:24am

I did that, but the annoying part is that I need to add that to every project I work with manually, even the new projects are created with that missing target.

Is there a way to get VS 2010 publishing to work the old way? If I uninstall VS 2012 RC that will work?

June 13th, 2012 4:56pm

Same issue I'm having. Manually added target. Error gone but files are not being copied in either Debug or Release.

Free Windows Admin Tool Kit Click here and download it now
June 13th, 2012 5:22pm

Yikes, Thanks all, although it took me 3 hours to see this thread after pulling my hair.

At first I saw the bizarre new Web Publish form and thought what am I smoking ...

And all because I decided to look into using azure, oh well thanks decision made ....

Amazing .... 

update:

OK, here is the actual cause of the problem, apparently installing azure  has a frenzy of fun, you just need to uninstall the following!

Can I rant for a sec? This is the real solution, because seriously the addition of these items for azure breaks everyone of my web deploy apps? Seriously bad stuff ... just my 2 cents

BTW, I don't even have Web Developer express installed so why it installed it .... you only really need the other one uninstalled but I want it all gone ...


  • Proposed as answer by TD10 Thursday, June 14, 2012 3:33 AM
  • Edited by TD10 Thursday, June 14, 2012 3:34 AM
  • Marked as answer by Arwind - MSFTModerator Tuesday, June 19, 2012 10:16 AM
June 14th, 2012 4:36am

Thanks TD10 it solved the issue, I'm back to the old publish window.
Free Windows Admin Tool Kit Click here and download it now
June 14th, 2012 4:28pm

Your welcome. I'm adding the following additional error in case someone is searching on that instead. I was initial having the problem using the publish method: Web Deploy but found no help. It was only when I tried the file system method that I found this thread ...

Missing or Invalid property value for $(MsDeployServiceUrl)

Error 4 The "NormalizeServiceUrl" task was not given a value for the required parameter

June 14th, 2012 5:57pm

Guys I'm terribly sorry you are running into this issue.

I think that I know what the issue is. When you install the Azure SDK bits it installs some VS Web Publish updates. One of these updates the file at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets. Based on how our setup is defined if that file has an updated timestamp (for whatever reason) then when you install the new component the file does not get updated.

To resolve this you should be able to follow the steps below:

Can you try it out and let me know if it works or not?

Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2012 12:32am

It's good to know that for the next time it happen's, if ever. I had to re-install everything, I was pulling my hair. :(

Thanks

June 23rd, 2012 2:04am

Worked, thanx
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2012 5:00pm

No, it did not work. The folder is still empty after a file deploy in release.

Also, I don't know what that patch did, but it did not create a new Microsoft.WebApplication.targets file.

June 26th, 2012 10:20pm

After install/repair the component,it works!

Thanks

Free Windows Admin Tool Kit Click here and download it now
June 30th, 2012 9:18am

Running VS10SP1-KB2591016-x86.exe did not recreate a new Microsoft.WebApplication.targets file.

Running repair on "Microsoft Web Publish - Visual Studio 2010" does recreate this file, but does not fix my issue.

The folder is still empty after a file system deploy.

obj\Release\Package\PackageTmp appears to have the files. It is just not copying them over to the publish location.

I don't want to just uninstall this new publish tool (as suggested above), because I also need to publish to Azure.

August 15th, 2012 10:54pm

My machine does not have the path that Sayed mentions. I only have:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications

However, running the exe at his link solved the problem for me. My original Microsoft.WebApplication.targets did not change and is still dated 8/11/2011.

I do have the Azure June SDK installed but not VS 2012. I do have Web Matrix 2 RC installed so that's probably what caused the problem for me.

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2012 3:23pm

Guys, the following proposed solution is only for VS2010, not VS2012:

August 23rd, 2012 3:10am

Yes, it works for VS2010.

But strange that the original file had the modify date as of 2011-01-18 and the new one is dated 2011-08-11 which is definitely more recent.

Free Windows Admin Tool Kit Click here and download it now
August 24th, 2012 5:04pm

I think, that upgrading from VS 2010 to 2012 left the path to the targets files to v10.

You just have to edit project file and change the path in tag <import project> to v11.0

i.E. <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

Hope that helps.

October 16th, 2012 11:44am

Guys I'm terribly sorry you are running into this issue.

I think that I know what the issue is. When you install the Azure SDK bits it installs some VS Web Publish updates. One of these updates the file at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets. Based on how our setup is defined if that file has an updated timestamp (for whatever reason) then when you install the new component the file does not get updated.

To resolve this you should be able to follow the steps below:

Can you try it out and let me know if it works or not?


This one works for me... anyway, the v11.0 folder don't exist in my computer and also I removed the Web Publish components as recommended in previous post
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2012 5:09pm

I was getting this error in VS2012 (for a project initially created with VS2010).  I was able to resolve this by editing the csproj file.  It previously contained:

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />

Changing that to the following fixed it for me:

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" />

December 28th, 2012 2:54am

Yes - fixed it for me.

Many thanks

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2013 1:59am

Niedawno zainstalowano nowe Azure narzdzi rozwojowych dla Visual Studio 2010 z dodatkiem Service Pack 1. Za kadym razem staram si publikowa istniejcej strony internetowej (wykorzystujc wdroenie systemu plikw) pojawia si nastpujcy bd:

Target "GatherAllFilesToPublish" nie istnieje w projekcie.

Czy kto moe mi powiedzie, czego mi brakuje?

Dziki



  • Proposed as answer by K.oyski Saturday, February 16, 2013 9:49 PM
  • Unproposed as answer by K.oyski Saturday, February 16, 2013 9:50 PM
  • Proposed as answer by K.oyski Saturday, February 16, 2013 9:50 PM
February 17th, 2013 12:49am

Guys I'm terribly sorry you are running into this issue.

I think that I know what the issue is. When you install the Azure SDK bits it installs some VS Web Publish updates. One of these updates the file at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets. Based on how our setup is defined if that file has an updated timestamp (for whatever reason) then when you install the new component the file does not get updated.

To resolve this you should be able to follow the steps below:

Can you try it out and let me know if it works or not?

I did not have a v11.0 folder, so I renamed C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets to Microsoft.WebApplication.targets.bak, and then ran the attached link. This created a new Microsoft.WebApplication.targets dated 9/24/2012 and fixed the problem.

Thanks!

Free Windows Admin Tool Kit Click here and download it now
April 30th, 2013 6:31am

Great job Sayed, saved me a few hours of research!!!

Tks a lot!

May 21st, 2013 4:47pm

  <Project>
<!-- [...] -->
 <Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
    <AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
  </Target>
  <!-- AVR: for workaround publish error: "GatherAllFilesToPublish" no existe en el proyecto -->
  <Target Name="GatherAllFilesToPublish">
  </Target>
  <ProjectExtensions>
<!-- [...] -->
</project>

It works find for me,

Thanks very much

Free Windows Admin Tool Kit Click here and download it now
June 14th, 2013 7:42pm

Yes ... this one works for me too.  I am using VS2010.
September 12th, 2013 7:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics